package com.cloudree.gllib.render;

import android.opengl.GLSurfaceView;

import com.cloudree.gllib.shape.Shape;

/**
 * Created by Administrator on 2017/8/1.
 */
public abstract class BaseRender implements GLSurfaceView.Renderer {
    protected static float[] mMVPMatrix = new float[16];
    protected static float[] mModelMatrix = new float[16];
    protected static float[] mViewMatrix = new float[16];
    protected static float[] mProjectionMatrix = new float[16];
    protected static float[] mLightModelMatrix = new float[16];

    /**
     * Store the accumulated rotation.
     */
    protected final float[] mAccumulatedRotation = new float[16];

    /**
     * Store the current rotation.
     */
    protected final float[] mCurrentRotation = new float[16];

    /**
     * A temporary matrix.
     */
    protected float[] mTemporaryMatrix = new float[16];

    protected static float[] mLightEyeSpace = new float[4];
    protected static float[] mLightWorldSpace = new float[4];
    protected static float[] mLightModelSpace = new float[]{0.0f,0.0f,0.0f,1.0f};
    protected Shape mShape;
}
